import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Records here.
 * 
 * @author Dulce Nataly Guadarrama Mani

 */
public class Records extends World
{

    /**
     * Constructor for objects of class REcords.
     * 
     */
    private ScoreBoard scoreBoard;
    private BotonFlecha flechaAtras;
    public Records()
    {    
        // Create a new world with 600x400 cells with a cell size of 1x1 pixels.
        super(700, 500, 1); 
        addObject(new ScoreBoard(600, 400), getWidth() / 2, getHeight() / 2);
        flechaAtras= new BotonFlecha();
        addObject(flechaAtras,50,getHeight()-30);
    }
    public void act()
    {
        clickAtras();
    }
    /** Método para detectar si se dio clic en BotonFlecha*/
     public void clickAtras()
    {
        if(Greenfoot.getMouseInfo()!=null){ 
            if(Greenfoot.mouseClicked(flechaAtras)){  
                Greenfoot.setWorld(new Menu());
            }
        }
    }
}
